package com.kly.smartbi.test.day07;

import java.util.Scanner;

/**
 * @author admin
 * @date 2025/4/9
 */
public class Demo1 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...

    }

    /**
     * 刷题统计
     */
    public static void getPassRate() {

        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long a = scan.nextLong();
        long b = scan.nextLong();
        long c = scan.nextLong();

        long sum = 0;
        long day = 0;

        long num = a * 5 + b * 2;
        long i = c / num;
        long j = c % num;

        while(day < j) {
            day++;
            if(day % 7 == 6 || day % 7 == 0) {
                sum += b;
            } else {
                sum += a;
            }
        }
        System.out.println(i * num + sum);


        scan.close();
    }


    /**
     * 数列求值
     * @return
     */
    public static void getNum() {
        int a = 1,b = 1,c = 1,d = 0;
        for(long i = 1; i <= 20190324; i++ ) {
            d = (a + b + c) % 10000;
            a = b;
            b = c;
            c = d;
        }
        System.out.printf("%04d%n",d);
    }

    /**
     * 年号字串
     */
    public static void getYearStr() {
        int n = 2019;
        StringBuilder sb = new StringBuilder();
        while (n > 0) {
            n--;
            sb.append((char) (n % 26 + 'A'));
            n /= 26;
        }
        System.out.println(sb.reverse().toString());
    }

    /**
     * 幸运数
     */
    public static void getLuckNum() {
        Scanner scan = new Scanner(System.in);
        long count = 0;
        for (long i = 1; i <= 100000000; i++) {
            if (isLuckNum(i)) {
                count++;
            }
        }
        System.out.println(count);
    }

    public static boolean isLuckNum(long num) {
        String numStr = num + "";
        if (numStr.length() % 2 == 1) {
            return false;
        }
        int j = numStr.length() - 1;
        long a = 0;
        long b = 0;
        for (int i = 0; i < numStr.length() / 2; i++, j--) {
            a += (long) numStr.charAt(i);
            b += (long) numStr.charAt(j);
        }
        return a == b;
    }
}
